/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.stock.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.modules.sys.entity.User;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 仓库Entity
 * @author 仓库
 * @version 2019-12-22
 */
public class WarehouseLoc extends DataEntity<WarehouseLoc> {
	
	private static final long serialVersionUID = 1L;
	private Warehouse c;		// 仓库 父类
	private String code;		// 编码
	private String name;		// 库位名称
	private int number;		// 数量
	private Date cdate;		// 日期
	private User user;		// 负责人
	private String ctype;		// 类型
	
	public WarehouseLoc() {
		super();
	}

	public WarehouseLoc(String id){
		super(id);
	}

	public WarehouseLoc(Warehouse c){
		this.c = c;
	}

	@Length(min=0, max=32, message="仓库长度必须介于 0 和 32 之间")
	public Warehouse getC() {
		return c;
	}

	public void setC(Warehouse c) {
		this.c = c;
	}
	
	@Length(min=0, max=10, message="编码长度必须介于 0 和 10 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=200, message="库位名称长度必须介于 0 和 200 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public  int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCdate() {
		return cdate;
	}

	public void setCdate(Date cdate) {
		this.cdate = cdate;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=255, message="类型长度必须介于 0 和 255 之间")
	public String getCtype() {
		return ctype;
	}

	public void setCtype(String ctype) {
		this.ctype = ctype;
	}
	
}